﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;
using System.Resources;
using Resources;
using System.ComponentModel;
//using Admin.App_GlobalResources;

namespace Admin.Areas.Administration.Models
{
    public class CreateUserModel
    {

        [RegularExpression(@"[A-Za-z][A-Za-z0-9._]{3,80}",
            ErrorMessageResourceType=typeof(Resource),
            ErrorMessageResourceName = "Error_UserName")]
        [Required(ErrorMessageResourceType=typeof(Resource),ErrorMessageResourceName = "Error_UserName_Required")]
        [Display(ResourceType=typeof(Resource),Name = "Username")]
        public string UserName { get; set; }

        [MaxLength(30)]
        [Display(ResourceType=typeof(Resource),Name = "FullName")]
        [Required(ErrorMessageResourceType = typeof(Resource),
            ErrorMessageResourceName = "Error_FullName_Required")]//The Name field is required.
        public string FullName { get; set; }

         [Required(ErrorMessageResourceType = typeof(Resource),
            ErrorMessageResourceName = "Error_Email_Required")]//The Emailaddress field is required.
         [DataType(DataType.EmailAddress,
             ErrorMessageResourceType = typeof(Resource),
             ErrorMessageResourceName = "Error_Email_Format")]
         [Display(ResourceType = typeof(Resource), Name = "EmailAddress")]
        public string Email { get; set; }

         [Required(ErrorMessageResourceType = typeof(Resource),
            ErrorMessageResourceName = "Error_Phone_Required")]//The Phone field is required.
        [DataType(DataType.PhoneNumber)]
        [Display(ResourceType = typeof(Resource), Name = "Phone")]
        public string Phone { get; set; }


        [RegularExpression(@"^(?=.*[a-z])(?=.*[0-9]).{6,32}$",
            ErrorMessageResourceType = typeof(Resource),
            ErrorMessageResourceName = "Error_Password_Input")]
         [Required(ErrorMessageResourceType = typeof(Resource),
            ErrorMessageResourceName = "Error_Password_Required")]//The Password field is required.
        [StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)]
        [DataType(DataType.Password)]
        [Display(ResourceType = typeof(Resource), Name = "Password")]
        public string Password { get; set; }

        [DataType(DataType.Password)]
        [Display(ResourceType = typeof(Resource), Name = "Confirm_password")]
        [Compare("Password",
            ErrorMessageResourceType = typeof(Resource),
            ErrorMessageResourceName = "Error_Repassword")]
        public string ConfirmPassword { get; set; }

        [Required(ErrorMessageResourceType = typeof(Resource),
           ErrorMessageResourceName = "Error_Address_Required")]
        [DataType(DataType.Text)]
        [Display(ResourceType = typeof(Resource), Name = "Address")]
        public string Address { get; set; }

        [Display(ResourceType=typeof(Resource),Name="Active")]
        public bool IsConfirm { get; set; }

    }

    public class LoginModel
    {

         [Required(ErrorMessageResourceType = typeof(Resource), ErrorMessageResourceName = "Error_UserName_Required")]
        public string UserName { get; set; }

          [Required(ErrorMessageResourceType = typeof(Resource),
            ErrorMessageResourceName = "Error_Password_Required")]
        [DataType(DataType.Password)]
        public string Password { get; set; }

       
    }

    public class ModelViewHotelManager {
        public string UserName { get; set; }
        public string Fullname { get; set; }
        public string Phone { get; set; }
        public string Email { get; set; }
        public string Address { get; set; }
        public bool IsConfirm { get; set; }
    }

}